Add dashboard connector for local browser imports - #227
Conversation
|
🔧 CI Fix Available I've pushed a fix for the CI failure.
The request is now retried a few times, and both download tests in that file skip instead of fail when github.com cannot be reached. A non-200 response or a genuine extraction bug still fails the test, and the per-attempt timeouts stay well inside Go's default 10 minute package timeout so a stalled download ends in a skip rather than a panic. |
c590d01 to
3bc8e01
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3bc8e01. Configure here.
3bc8e01 to
91296d1
Compare

What
Add the macOS bridge that lets the Kernel dashboard open the existing local browser-import wizard with a
kernel://browser-import?project_id=...link.kernel connector installto register a user-levelKernel Connector.appkernel connector opendeep-link entrypointprofiles import-local; no second importer or downloaded helper is introducedWhy
The previous dashboard handoff asked users to copy several terminal commands and manually carry a project ID. The connector turns that into one dashboard button while keeping sensitive browser and password-manager access inside the local CLI and its explicit terminal confirmations.
How
The dashboard supplies only a non-secret project ID. The CLI remains responsible for authentication, authorization, browser discovery, cookie selection, password-manager approval, profile import, and Managed Auth provisioning.
The installed app is a tiny AppleScript URL handler that delegates to the stable Kernel CLI path through a login shell. Installation is user-scoped, verifies exact bundle ownership before replacement, signs the completed app, preserves the previous app if rollback fails, and registers it with Launch Services. No server-side intent or new API is required.
This is intentionally macOS-only for the MVP. Windows and Linux return an explicit unsupported-platform error until their protocol-handler packaging is implemented.
Safety
kernel://browser-importroute with one validated project IDVerification
go test ./internal/connector ./internal/browserimport ./internal/passwordmanager ./internal/agentskills ./pkg/auth ./pkg/interactive ./cmdgo vet ./internal/connector ./internal/browserimport ./internal/passwordmanager ./internal/agentskills ./pkg/auth ./pkg/interactive ./cmd/usr/bin/osacompile/usr/bin/codesign --verify --strictpassedStack
Depends on #224, which depends on #223.
Note
High Risk
Registers a macOS protocol handler (AppleScript + Launch Services) and changes authentication recovery, cookie export, and password-manager/Managed Auth provisioning. Bugs here can affect local credential handling, project access, or OS-level URL dispatch.
Overview
Lets the Kernel dashboard launch local browser import via a
kernel://browser-import?project_id=...link, instead of copying CLI commands.Adds
kernel connector install(Homebrew post-install on macOS) which registers a user-scopedKernel Connector.appURL handler that delegates to the stable CLI binary. Hiddenconnector openparses a tightly validated deep link, authenticates on demand, checks the project is active, and reusesprofiles import-local. Wrong-account or invalid-API-key cases can recover with a prompted browser login (process-localKERNEL_API_KEYunset only).Local import no longer caps at 5–10 recent sites: users can import all cookies or pick sites, and Managed Auth is quota-aware (org
max_auth_connections), skips existing connections, and chooses logins per website. Cookie export can filter large site lists via a SQLite CTE; Bitwarden candidate lookup is bounded and concurrent. Auth now distinguishes missing credentials from storage/refresh failures so the connector can prompt login without hiding real errors.Reviewed by Cursor Bugbot for commit 91296d1. Bugbot is set up for automated code reviews on this repo. Configure here.